﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Http;
using System.Collections.Concurrent;
using System.IO;
using System.Net.Http;
using System.Net;

using System.Diagnostics;

namespace ERPStore.Host
{
	public class AdminController : ApiController
	{
		[HttpGet]
		public DateTime Ping()
		{
			return DateTime.Now;
		}

		public Dictionary<int, string> GetThreadList()
		{
			var result = new Dictionary<int, string>();
			var process = System.Diagnostics.Process.GetCurrentProcess();
			foreach (ProcessThread thread in process.Threads)
			{
				result.Add(thread.Id, thread.ToString());
			}
			return result;
		}
	}
}
